# Исправленный код с добавленными headers и params:

import websocket

def on_message(ws, message):
    print('pizda')
    print(message)

def on_error(ws, error):
    print('hui')
    print(error)

def on_close(ws, close_status_code, close_msg):
    print("Connection closed")

def on_open(ws):
    print("Connection established")

headers = {
    'Pragma': 'no-cache',
    'Origin': 'https://blur.io',
    'Accept-Language': 'ru,en;q=0.9',
    'Sec-WebSocket-Key': 'ibwZ5eEFyMr+RhIQWjSlkA==',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 YaBrowser/23.3.1.895 Yowser/2.5 Safari/537.36',
    'Upgrade': 'websocket',
    'Cache-Control': 'no-cache',
    'Connection': 'Upgrade',
    'Sec-WebSocket-Version': '13',
    'Sec-WebSocket-Extensions': 'permessage-deflate; client_max_window_bits',
}
#
# params = {
#     'tabId': 'r5uvSmKINahj',
#     'storageId': '3nNqrl650epi',
#     'EIO': '4',
#     'transport': 'websocket',
# }

websocket.enableTrace(True)

ws = websocket.WebSocketApp('wss://feeds.prod.blur.io/socket.io/',
                            header=headers,
                            subprotocols=['chat'],
                            on_message=on_message,
                            on_error=on_error,
                            on_close=on_close,)
                            # **params)
ws.on_open = on_open
ws.run_forever()